/** @type {import('tailwindcss').Config} */

import cssMacro from "weapp-tailwindcss/css-macro";

module.exports = {
  darkMode: "class",
  content: ["./index.html", "./src/**/*.{html,js,ts,jsx,tsx,vue}"],
  // 兼容小程序，将 : 替换成 __
  separator: "__",
  theme: {
    extend: {},
  },
  // 兼容小程序，将默认配置里带 .和/ 清除
  variants: {},
  plugins: [
    cssMacro({
      variantsMap: {
        wx: "MP-WEIXIN",
        "-wx": {
          value: "MP-WEIXIN",
          negative: true,
        },
        // 定义多个条件判断
        // mv: {
        //   value: 'H5 || MP-WEIXIN'
        // },
        // '-mv': {
        //   value: 'H5 || MP-WEIXIN',
        //   negative: true
        // }
      },
    }),
  ],
  corePlugins: {
    // 兼容小程序，将带有 * 选择器的插件禁用
    preflight: false,
    space: false,
    divideColor: false,
    divideOpacity: false,
    divideStyle: false,
    divideWidth: false,
  },
};
